home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3x / cpusetAttachPID.z / cpusetAttachPID
Encoding:
Text File  |  2002-10-03  |  2.9 KB  |  67 lines

  1.  
  2.  
  3.  
  4. ccccppppuuuusssseeeettttAAAAttttttttaaaacccchhhhPPPPIIIIDDDD((((3333xxxx))))                                        ccccppppuuuusssseeeettttAAAAttttttttaaaacccchhhhPPPPIIIIDDDD((((3333xxxx))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      cpusetAttachPID - attach a specific process to a cpuset
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ccccppppuuuusssseeeetttt....hhhh>>>>
  13.  
  14.      iiiinnnntttt ccccppppuuuusssseeeettttAAAAttttttttaaaacccchhhhPPPPIIIIDDDD((((qqqqnnnnaaaammmmeeee,,,, ppppiiiidddd))));;;;
  15.  
  16.      cccchhhhaaaarrrr ****qqqqnnnnaaaammmmeeee;;;;
  17.  
  18.      ppppiiiidddd____tttt ppppiiiidddd;;;;
  19.  
  20.  
  21. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.      The _c_p_u_s_e_t_A_t_t_a_c_h_P_I_D function is used to attach a specific process
  23.      identified by its PID to the cpuset identified by _qqqq_nnnn_aaaa_mmmm_eeee.  Every cpuset
  24.      queue has a file that defines access permissions to the queue.  The
  25.      execute permissions for that file will determine if a process owned by a
  26.      specific user can attach a process to the cpuset queue.
  27.  
  28.      The _qqqq_nnnn_aaaa_mmmm_eeee argument is the name of the cpuset to which the specified
  29.      process should be attached.
  30.  
  31. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  32.      This example attaches the current process to a cpuset queue named
  33.      mpi_set.
  34.  
  35.                char *qname = "mpi_set";
  36.  
  37.                /* Attach to cpuset, if error - print error & exit */
  38.                if (!cpusetAttachPID(qname, pid)) {
  39.                    perror("cpusetAttachPID");
  40.                    exit(1);
  41.                }
  42.  
  43.  
  44. NNNNOOOOTTTTEEEESSSS
  45.      _c_p_u_s_e_t_A_t_t_a_c_h_P_I_D is found in the library "libcpuset.so", and will be
  46.      loaded if the option _----_llll_cccc_pppp_uuuu_ssss_eeee_tttt is used with _cccc_cccc(1) or _llll_dddd(1).
  47.  
  48. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  49.      cpuset(1), cpusetCreate(3x), cpusetDetachPID(3x), cpuset(5).
  50.  
  51. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  52.      If successful, _c_p_u_s_e_t_A_t_t_a_c_h_P_I_D returns a 1.  If _c_p_u_s_e_t_A_t_t_a_c_h_P_I_D fails, it
  53.      returns the value 0 and eeeerrrrrrrrnnnnoooo is set to indicate the error.  The possible
  54.      values for eeeerrrrrrrrnnnnoooo are the same as those used by _s_y_s_m_p(2).
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.